<template>
	<view>
		<!-- 顶部导航 -->
		<fa-navbar :title="vuex_table_title || '消息详情'"></fa-navbar>
		<view class="newsBody">
			<view class="newsTitle">
				<view class="newsAfter"></view>
				<view class="newsTxt u-font-40">
					{{title}}
				</view>
			</view>
			<view class="newsMain u-font-32">
				{{content}}
			</view>
		</view>
		
	</view>
</template>

<script>
	import {
		vote
	} from '@/common/fa.mixin.js';
	// #ifdef H5
	import {
		weixinShare
	} from '@/common/fa.weixin.mixin.js';
	// #endif
	export default {
		mixins: [
			vote,
			// #ifdef H5
			weixinShare
			// #endif
		],
		onLoad(e) {
			let query = e || {};
			this.id = query.id || 0;
			this.getDetail();
		},
		data() {
			return {
				title: '',
				content: '',
			};
		},
		methods: {
			getDetail: async function() {
				let res = await this.$api.getNoticeDetail({
					id: this.id,
				});
				if (!res.code) {
					return;
				}
				console.log('站内信详情：',res)
				this.title = res.data.message_title
				this.content = res.data.content
			},
		},
	};
</script>

<style lang="scss">
page {
	background-color: #f4f6f8;
	color: balck;
	.newsBody {
		width: 100%;
		height: 150rpx;
		margin-bottom: 20rpx;
		.newsTitle {
			font-size: 30rpx;
			font-weight: bold;
			display: flex;
			align-items: center;
			padding: 10rpx 10rpx;
			.newsAfter {
				width: 5rpx;
				height: 28rpx;
				margin: 0 10rpx;
				background-color: #d9001b;
			}
		}
		.newsMain {
			width: 100%;
			word-wrap:break-word;
			padding: 0 35rpx;
		}
	}
}
</style>
